package com.quanquan.user.controller;

import com.quanquan.user.request.UserFormIdRequest;
import com.quanquan.user.request.UserRequestBody;
import com.quanquan.user.service.UserFormIdService;
import enums.ResCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import web.response.ResultBody;

/**
 * @ClassName:UserFormIdController
 * @Description:TODO
 * @Author:xiongjunbao
 * @Date:2019/11/14 17:24
 * @Version 1.0
 */
@RestController
@RequestMapping("user_form_id")
public class UserFormIdController {

  @Autowired
  private UserFormIdService userFormIdService;

    /**
     * 保存用户formId
     *
     * @param  userFormIdRequest
     * @return
     */
    @PostMapping("/save_form_id")
    public ResultBody saveFormId(@RequestBody UserFormIdRequest userFormIdRequest) {
        boolean b = userFormIdService.saveUserFormId(userFormIdRequest);
        if (b){
            return new ResultBody(ResCodeEnum.SUCCESS.getCode(),ResCodeEnum.SUCCESS.getMsg());
        }
        return new ResultBody(ResCodeEnum.FAIL.getCode(),ResCodeEnum.FAIL.getMsg());
    }

}
